namespace ResumableDownload.ViewModel.Messages
{
    using System;
    using GalaSoft.MvvmLight.Messaging;

    public abstract class BaseMessage : MessageBase
    {
        #region Constants and Fields

        private Exception exception;

        #endregion

        #region Constructors and Destructors

        public BaseMessage()
        {
        }

        public BaseMessage(Exception ex)
        {
            this.exception = ex;
        }

        #endregion

        #region Properties

        public Exception Exception
        {
            get
            {
                return this.exception;
            }

            protected set
            {
                this.exception = value;
            }
        }

        public bool Failed
        {
            get
            {
                return this.exception != null;
            }
        }

        #endregion
    }
}